﻿-var folders = ViewData["folders"] as List<KBFolder>
-var documents = ViewData["documents"] as List<KBDocument>
-int folderid = (int)ViewData["folderid"]
#content
  %h1=ViewData["foldertitle"]
  %dl
    -foreach(var d in documents)
      %dd
        %a{href=string.Format("kb.ivp/view/{0}",d.Id)}=d.Name
      %dt=d.ShortDescription
#rightmenu
  %h3 База знаний
  %ul
    -foreach(var f in folders)
      %li.indent10
        %a{href=string.Format("kb.ivp/list/{0}",f.Id)}=f.Name
        -if(f.KBFolders.Count()>0)
          %ul
            -foreach(var sf in f.KBFolders.OrderBy(kf=>kf.SortOrder))
              %li.indent10
                %a{href=string.Format("kb.ivp/list/{0}",sf.Id)}=sf.Name
                -if(sf.KBFolders.Count()>0)
                  %ul
                    -foreach(var ssf in sf.KBFolders.OrderBy(kf=>kf.SortOrder))
                      %li.indent10.small
                        %a{href=string.Format("kb.ivp/list/{0}",ssf.Id)}=ssf.Name
                .spacer5